package com.nicy.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Size;


@Data
public class Student {
    //@Length(max = 10)
    @Size(max = 10,message = "用户名最大长度为10位")
    private String name;
    @Max(value = 100,message = "年龄最大为100岁")
    @Min(value = 1,message = "年龄最小为1岁")
    private Integer age;
}
